﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.SessionState;

namespace SessionInMvc.Controllers
{
    public class SessionTestController : Controller
    {
        //
        // GET: /SessionTest/

        public ActionResult Write()
        {
            this.Session["Data"] = DateTime.Now;

            this.Response.Write(this.Session["Data"]);

            return View();
        }

        public ActionResult ReadLong()
        {
            System.Threading.Thread.Sleep(10000);

            return View();
        }

        public ActionResult ReadShort()
        {
            return View();
        }
    }
}
